<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>

<html>
<head>
	<c:import url="css.jsp"></c:import>    
</head>
<body>
<c:import url="header.jsp"></c:import>
<div id="content">
${result}
<div id="title">You have the following fees :</div>
	<c:forEach items="${ items}" var="item">
			<form action="payfees.do" method="post" >
				${result}<br/>
				 <input type="hidden" name="id" value="${item.loanId }" />
				Item ID : ${item.itemId } </br>
				Late Fees: ${item.lateFees } <br/>
				<c:choose>
					<c:when test="${item.returned}">
						<input type="submit" value="pay fees" />
					</c:when>
					<c:otherwise>
						<b>Please return item first before paying late fees.</b>
						<a href="returnItem.do?loanId=${item.loanId}">return item</a>
						
					</c:otherwise>
				</c:choose>
				<br/>
			</form>
		<br/>
		**********************************
		<br/>
		
	</c:forEach>
	
	</div>
</body>
</html>